<?php

/**
 * @filename WorkflowAbstract.class.php 
 * @encoding UTF-8 
 * @author nemo.xiaolan <a href="mailto:335454250@qq.com">335454250@qq.com</a>
 * @link <a href="http://www.sep-v.com">http://www.sep-v.com</a>
 * @license http://www.sep-v.com/code-license
 * @datetime 2013-11-15  10:09:20
 * @Description
 * 
 */
abstract class WorkflowAbstract implements WorkflowInterface{
    
    protected $mainrowId;
    
    protected $view;
    
    public function __construct($mainrowId) {
        $this->mainrowId = $mainrowId;
        $this->view = Think::instance('View');
    }
    
    public function init() {}
    
    public function run() {}
    
    public function save() {}
    
    protected function updateStatus($model, $mainrow_id, $status) {
        $model = D($model);
        $data = array(
            "id" => $mainrow_id,
            "status" => $status
        );
        return $model->save($data);
    }
    
}

?>
